//
//  CardViewCell.h
//  KeTianDemo
//
//  Created by jay on 2020/8/24.
//  Copyright © 2020 jay. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class CardViewCell;

@protocol CardViewCellDelagate <NSObject>

@optional
- (void)cardViewCellDidRemoveFromSuperView:(CardViewCell *)cell;
- (void)cardViewCellDidMoveFromSuperView:(CardViewCell*)cell forMovePoint:(CGPoint)point;

@end


typedef NS_ENUM(NSInteger,CardCellSwipeDirection) {
    CardCellSwipeDirectionLeft = 0,
    CardCellSwipeDirectionRight,
};


@interface CardViewCell : UIView

@property (nonatomic, strong) UIView *contentView;//!< 内容视图
@property (nonatomic, copy) NSString *reuseIdentifier;//!< 重用标识

@property (nonatomic, assign) CGFloat maxAngle;
@property (nonatomic, assign) CGFloat maxRemoveDistance;
@property (nonatomic, weak) id<CardViewCellDelagate> cell_delegate;

/*!
 @brief 初始化方法
 @param reuseIdentifier 复用id
 @return self
 */
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier;

/*!
 @brief 移除cell
 @param direction 移除方向
 */
- (void)removeFromSuperviewSwipe:(CardCellSwipeDirection)direction;

@end

NS_ASSUME_NONNULL_END
